package com.example.anan.AAChartCore;

import com.example.anan.AAChartCore.AAChartCoreLib.AAChartCreator.AAChartModel;
import com.example.anan.AAChartCore.AAChartCoreLib.AAChartCreator.AAMoveOverEventMessageModel;
import com.example.anan.AAChartCore.AAChartCoreLib.AAChartCreator.AAOptionsConstructor;
import com.example.anan.AAChartCore.AAChartCoreLib.AAChartCreator.AASeriesElement;
import com.example.anan.AAChartCore.AAChartCoreLib.AAOptionsModel.AAOptions;
import com.example.anan.AAChartCore.AAChartCoreLib.AATools.AAColor;
import com.example.anan.AAChartCore.AAChartCoreLib.AATools.AAGradientColor;
import com.example.anan.AAChartCore.AAChartCoreLib.AATools.AAJSStringPurer;
import com.example.anan.AAChartCore.AAChartCoreLib.AATools.AALinearGradientDirection;
import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
import org.junit.Test;

import java.util.Map;

import static org.junit.Assert.assertEquals;

public class ExampleOhosTest {
    @Test
    public void testBundleName() {
        final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
        assertEquals("com.example.anan.AAChartCore", actualBundleName);
    }

    @Test
    public void testAAChartModel() {
        AAChartModel aaChartModel = new AAChartModel();
        aaChartModel.xAxisReversed(true)
                .yAxisReversed(true)
                .inverted(true)
                .gradientColorEnable(true)
                .tooltipEnabled(true);
        System.out.println(aaChartModel);
    }

    @Test
    public void testAAMoveOverEventMessageModel() {
        AAMoveOverEventMessageModel aaChartModel = new AAMoveOverEventMessageModel();
        System.out.println(aaChartModel);
    }

    @Test
    public void testAAOptionsConstructor() {
        AAChartModel aaChartModel = new AAChartModel();
        AAOptions aaOptions = AAOptionsConstructor.configureChartOptions(aaChartModel);
        System.out.println(aaOptions);
    }

    @Test
    public void testAASeriesElement() {
        AASeriesElement aaSeriesElement = new AASeriesElement();
        aaSeriesElement.allowPointSelect(true).borderWidth(1f).colorByPoint(true);
        System.out.println(aaSeriesElement);
    }

    @Test
    public void testAAColor() {
        String s = AAColor.rgbaColor(255, 255, 255, 1f);
        System.out.println(s);
    }

    @Test
    public void testAAGradientColor() {
        Map<String, Object> oceanBlue = AAGradientColor.OceanBlue;
        Map<String, Object> sanguine = AAGradientColor.Sanguine;
        Map<String, Object> lusciousLime = AAGradientColor.LusciousLime;
        System.out.println(oceanBlue);
        System.out.println(sanguine);
        System.out.println(lusciousLime);
    }

    @Test
    public void testAAJSStringPurer() {
        String s = AAJSStringPurer.pureJavaScriptFunctionString("");
        System.out.println(s);
    }

    @Test
    public void testAALinearGradientDirection() {
        AALinearGradientDirection toBottom = AALinearGradientDirection.ToBottom;
        System.out.println(toBottom);
    }
}